-- GENERATED SPELL FOR [Dark Strand Voidcaller] --


function spell0_2337(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(20807,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_2337', 3000, 1)
end

function spell1_2337(pUnit, Event) --@Summon Voidwalker,Self--
pUnit:FullCastSpellOnTarget(12746,pUnit)
pUnit:RegisterEvent('Sorts_2337', 541, 1)
end

function Sorts_2337(pUnit, Event)
local choix_sorts_2337 = math.random(0, 1)
if choix_sorts_2337 == 0 then
pUnit:RegisterEvent('spell0_2337', 1, 1)
end
if choix_sorts_2337 == 1 then
pUnit:RegisterEvent('spell1_2337', 1, 1)
end
end

function mob2337_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_2337', math.random(1500, 3000), 1)
end

function mob2337_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob2337_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob2337_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(2337, 1, 'mob2337_Action')
RegisterUnitEvent(2337, 2, 'mob2337_Leave')
RegisterUnitEvent(2337, 3, 'mob2337_Kill')
RegisterUnitEvent(2337, 4, 'mob2337_Die')
